<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
%>
<jsp:include page="/share/top.jsp" />
<SCRIPT language="javascript">
   	function linkOnClick(formName, equCode)
   	{
   		if(window.confirm('确实要删除该设备信息？')){
   			var form = document.forms[formName];
   			form.action="<%=path%>/equDim.do?method=removeTblEquDim&equCode=" + equCode;
   			form.submit();
   		}    			
   	}
    function queryOnclick(){
		document.forms[0].submit();
	}
    
    layui.use(['form','layer','laypage'], function(args){
    	var totalPage = parseInt("${pr.totalPage}");
    	var currPage = parseInt("${pr.currPage}");
    	layui.laypage({
			cont: 'page'
			,pages: Math.ceil(totalPage)
			,curr:currPage
			,jump: function(row, first){
				if(!first){
					document.location.href='<%=path%>/EquCtrl/list.x?page='+row.curr;
				}
			}
		});
    });
</SCRIPT>
<form action="<%=path %>/EquCtrl/query.x?page=1" method="post">
    <span class="searchbox">
    	设备编号<input type="text" name="strEquCode" class="searchtxt" value="<c:out value='${strEquCode }'/>" />
    </span>
    <span class="searchbox">
    	设备类型 
    	<select name="devtype">
    		<option value="s"> 室内机 </option>
    		<option value="d"> 门口机 </option>
    		<option value="m"> 管理机 </option>
    		<option value="g"> 围墙机 </option> 
    	</select>
	</span>
    
    <input type="button" class="layui-btn layui-btn-small layui-btn-normal" value="查询" onclick="queryOnclick();"/>
	<div class="table-responsive">
      <table class="table layui-table" cellpadding="0" cellspacing="0">
        <thead>
        <tr>
            <th class="t4">设备编号</th>
            <th class="t3">设备类型</th>
            <th class="t5" >设备位置</th>

            <th class="t6">在线状态</th>
            <!--<th class="t7">操作 </th>-->
          </tr>
        </thead>
     <tbody>
     	<c:forEach var="TblEquDimBo" items="${tblEquDims.list}" varStatus="e">
          <tr <c:if test="${e.count%2==1}"> class="split" </c:if>>
            <td class="t4"><c:out value="${TblEquDimBo.equCode}" /></td>
            <td class="t3">
            <c:choose>
            	<c:when test="${TblEquDimBo.equType=='s'}">室内机</c:when>
            	<c:when test="${TblEquDimBo.equType=='d'}">门口机</c:when>
            	<c:when test="${TblEquDimBo.equType=='m'}">管理机</c:when>
            	<c:when test="${TblEquDimBo.equType=='g'}">围墙机</c:when>
            	<c:otherwise></c:otherwise>
            </c:choose>
            </td>
            <td class="t5"><c:out value="${TblEquDimBo.equName}" /></td>
            
            <td class="t6">
            <c:choose>
            	<c:when test="${TblEquDimBo.equState=='0'}">不在线</c:when>
            	<c:when test="${TblEquDimBo.equState=='1'}">在线</c:when>
            	<c:otherwise></c:otherwise>
            </c:choose>
            </td>

          </tr>
        </c:forEach>
     </tbody>
    </table>
 	</div>
   <div id="page"></div>

</form>
<jsp:include page="/share/foot.jsp" />

</SCRIPT>
